package org.example.result;

/**
 * @description: 一些返回的code、msg
 * @author: user
 * @create: 2018-10-11 15:17
 */
public enum ResponseCode {

    SERVICE_SUCCESS(200, "操作成功"),
    SEEVICE_FAIL(300, "操作失败"),
    SESSION_TIMEOUT(403,"用户信息失效，请重新登录"),
    JUMP_PAGE(400,"页面需要跳转"),
    NOT_FOUND(404,"找不到对应的请求的地址"),
    SIGN_ERROR(405,"签名错误"),
    REQUEST_MODE_ERROR(405,"请求方式不正确"),
    VERSION_OUT_OF_TIME(401,"版本已过时"),
    SERVICE_ERROR(500, "请求出错，请稍后重试"),
    REQUEST_TIMEOUT(503,"请求超时");
    private final int code;
    private final String desc;


    ResponseCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

}
